package batframework.db;

import java.util.HashMap;
import java.util.Map;

@SuppressWarnings("unchecked")
public class ModelHashMap 
{
	private Map<String, Object> map;
	
	/**
	 * 
	 * @author bmyues
	 * @param key
	 * @return
	 */
	public <T> T get(String key)
	{
		return (T) map.get(key);
	}
	
	/**
	 * 
	 * @author bmyues
	 * @param key
	 * @param value
	 * @return
	 */
	public ModelHashMap put(String key,Object value)
	{
		map.put(key, value);
		return this;
	}
	
	/**
	 * 
	 * @author bmyues
	 * @return
	 */
	public ModelHashMap clear()
	{
		map.clear();
		return this;
	}
	
	/**
	 * 
	 * @author bmyues
	 * @param key
	 * @return
	 */
	public boolean containsKey(Object key)
	{
		return map.containsKey(key);
	}
	
	/**
	 * 
	 * @author bmyues
	 * @param value
	 * @return
	 */
	public boolean containsValue(Object value)
	{
		return map.containsValue(value);
	}
	
	/**
	 * 
	 * @author bmyues
	 * @return
	 */
	public boolean isEmpty()
	{
		return map.isEmpty();
	}

	public ModelHashMap()
	{
		this.map = new HashMap<String, Object>();
	}
	
	public static void main(String[] args)
	{

	}
	
}
